home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
doom
/
hxtutor.zip
/
HXTUTO01.ACS
< prev
next >
Wrap
Text File
|
1996-07-09
|
30KB
|
948 lines
#include "common.acs"
int WallHits; //Counts the number of times rock wall hits
int BellRung; //Counts the number of times the bell is rung
int GameStart; //Prints the Start Message to the various classes
int GemPuzzle; //Counter for the Gem/Planets Puzzle
script 2 (void)
{
int ToGo;
ToGo = 2 - FivePortals;
ambientsound("PuzzleSuccess", 127);
print(s: "ONE FORTH OF THE PUZZLE HAS BEEN SOLVED");
delay(32);
print(s: "FIVEPORTALS IS ", d: FivePortals + 1);
delay(20);
if(FivePortals < 2)
{
print(s:"YOU STILL HAVE " , d: ToGo, s:" SWITCHES TO GO");
}
FivePortals++;
delay(24);
ACS_Execute(160, 1, 0, 0, 0);
}
// SCRIPT 99 - Message Terminate Script
// Keeps Message Scripts From Overlapping
//
// Kills all Message Scripts except the one that called it
// Variables:
// Local:
// ScriptNum - Number of script that called this script
// Counter - To count through the message scripts
// Triggering Event:
// Each script in the Message Block calls this script as the first
// thing it does, thus killing all other Message scripts and
// allowing it to print it's message
// ACS_Execute(99, 1, X, 0, 0)
// Script Number 99
// Map Number 1
// X = Number of script that called it
// 0
// 0 When using ACS_Execute from WITHIN a Script, you need to go ahead
// and put in all 5 parameters, even if you don't use them
// Just put 0 for all that you don't use
script 99 (int ScriptNum)
{
int Counter;
Counter = 100; // 100 = 1st Script in Message Block
while(Counter < 114) // 114 = Last Script in Message Block + 1
{
if(ScriptNum != Counter) // Do this for all scripts except the
{ // one who called it
ACS_Terminate(Counter, 1); // Terminate Script
}
Counter++; // Increment Counter
}
}
// BEGIN Message Block of Scripts
// Most Message Statements that you will encounter will start
// here at 100. There is no reason for this other than to
// keep them together, thus making them easier to find for
// both you and me :)
// Actually I have added a reason, Script 99 which keeps the
// messages from overlapping and thus becoming unreadable
// SCRIPT 100 is the first script you will encounter in the game
// It prints a message based upon which Player Class you start
// with. It then prints out some opening info.
// Variables:
// World:
// none
// Map:
// GameStart - Simply a Counter so that the script is run
// only once, when you start the game.
// Local:
// PlayerType - Passed from the 3 lines at the start of the map.
// The lines are North lines of the 3 sectors with
// the Weapons in them.
// The left line is the one the Fighter Crosses so
// it sends a 1 as it's first argument
// The middle line sends a 2 for Cleric and the
// right line sends a 3 for Mage.
//
// Triggering Event:
// Crossing any of the 3 lines mentioned above.
// Each has ACS_EXECUTE(100,1,X) where X = 1 to 3
//
// One note so as not to confuse. PlayerType is a variable created
// by me. It is NOT a Hexen variable. I named it this because it
// makes sense. It could be called DudesClass and work just as well.
script 100 (int PlayerType) // PlayerType is 1 to 3 based on which line
{ // sent it.
if(GameStart==0) // If GameStart = 0, executes the instructions
{ // within the brackets *HERE* to *BELOW* *HERE*
Gamestart++; // increments GameStart to 1, because it is now
// 1, the if(Gamestart==0) is False and this
// section of script will not be run again
//SWITCH -- The Switch function 'reads' the Playertype variable
// If it equals 1, the statements in case 1: are executed
// If it equals 2, case 2: is executed, and 3 for 3
//
switch(PlayerType)
{
case 1: // case PlayerType is 1
PRINT(s:"WELCOME FIGHTER");
delay(48);
break; //Each case should end in a BREAK statement
//which halts the execution of the switch
//function
case 2: // case PlayerType is 2
PRINT(s:"WELCOME CLERIC");
delay(48);
break;
case 3: // case PlayerType is 3
print(s:"WELCOME MAGE");
delay(48);
break;
}
delay(32);
print(s: "WELCOME TO THE HEXEN SCRIPT TUTORIAL");
ambientsound("ThunderCrash", 127); // Nice sound for the start of this
delay(75); // tutorial, Volume = 127 (the Max.)
print(s: "HAVE YOUR SCRIPT FILE AND TUTORIAL HANDY");
delay(75);
print(s: "YOU WILL BE INFORMED OF MOST SCRIPTS NUMBERS");
delay(75);
print(s: "YOU HAVE JUST FINISHED SCRIPT 100");
delay(72);
} //*BELOW* end of if statement
}
// SCRIPT 101
// It prints a message as you walk down the first hallway
// and approach the first 2 rooms
// Variables:
// World:
// none
// Map:
// none
// Local:
// none
//
// Triggering Event:
// Crossing line near the north end of the hallway
// Each has ACS_EXECUTE(101,1)
script 101 (void)
{
ACS_Execute(99, 1, 101, 0, 0); // Terminate All Other Message Scripts
ambientsound("PickupPiece", 127); //Just to get you attention
switch(lineside())
{
case LINE_FRONT:
print(s: "YOU ARE NOW ENTERING THE FIRST NODE");
delay(70);
print(s: "TO THE RIGHT ARE EARTHQUAKES");
delay(70);
print(s: "AND TO THE LEFT");
delay(70);
print(s: "FUN WITH WATER");
delay(70);
break;
case LINE_BACK:
print(s: "DID YOU WANT TO GO BACK TO THE START?");
delay(70);
break;
}
print(s: "YOU HAVE JUST FINISHED SCRIPT 101");
}
// SCRIPT 102
// It prints a message as you enter the Earthquake Room
// Variables:
// World:
// none
// Map:
// none
// Local:
// none
//
// Triggering Event:
// Crossing line at the entrance of the Earthquake room
// ACS_EXECUTE(102,1)
script 102 (void)
{
ACS_Execute(99, 1, 102, 0, 0);
ambientsound("PickupPiece", 127); //Just to get your attention
delay(32);
switch(lineside())
{
case LINE_FRONT:
ambientsound("Earthquake", 127); //Really get your attention
print(s: "ENTERING THE EARTHQUAKE ROOM");
delay(75);
break;
case LINE_BACK:
print(s : "LEAVING EARTHQUAKE ROOM");
delay(75);
break;
}
print(s: "YOU HAVE JUST FINISHED SCRIPT 102");
}
// SCRIPT 103
// Prints messages about the first earthquake
script 103 (void)
{
ACS_Execute(99, 1, 103, 0, 0);
ambientsound("PickupPiece", 127); //Just to get your attention
switch(lineside())
{
case LINE_FRONT:
print(s: "LOOK AT THE POT AND THE ICE SPIKE");
delay(75);
print(s: "THEY BOTH HAVE A TID OF 2");
delay(75);
print(s: "WHEN YOU CROSS THE ICE LINE AHEAD");
delay(75);
print(s: "YOU WILL TRIGGER THE EARTHQUAKE");
delay(75);
print(s: "THESE WILL BE THE EPICENTER");
delay(75);
print(s: "THE IMPORTANT THING IS NOT WHAT THEY ARE,");
delay(75);
print(s: "MAP SPOTS, POTS, OR ETTINS, BUT,");
delay(75);